const { override, addWebpackLoader } = require('customize-cra');

module.exports = override(
  addWebpackLoader({
    test: /\.svg$/,
    use: [
      {
        loader: '@svgr/webpack',
        options: {
          svgoConfig: {
            plugins: [
              {
                name: 'removeXMLNS',
                active: false,
              },
            ],
          },
          ref: true,
          throwIfNamespace: false, // 忽略命名空间错误
        },
      },
    ],
  })
);